<!-- 设备维护 -->
<template>
  <div  class="dashboard-editor-container">
    <el-row style="background: #fff; margin: 0px 0px; margin-bottom: 32px" :gutter="50">
      <div class="wrap">
        <el-col :xs="22" :sm="22" :lg="22" :xl="22">
          <div class="parameType">
          <div class="title">下载客户端安装工具</div>
            <div class="content">
              <p style="height:140px;">客户端安装工具以常驻系统的模式存在于客户端电脑，更加方便终端用户使用。
                如果下载或者运行过程中有杀毒引擎提示异常，请放行或添加到信任。
              <span style="color:red;display:block;">安装包下载成功后，请选中安装文件后，使用右键菜单的“管理员身份运行”否则可能会安装失败</span>  
              </p>
              <el-button type="warning" @click="DownloadFile('Windows')">下载Windows客户端</el-button>
              <el-button type="warning" @click="DownloadFile('Mac')">下载Mac客户端</el-button>
              <!-- <el-button type="warning" @click="DownloadFile()">下载Android客户端</el-button> -->
              <!-- <el-button type="warning" @click="DownloadFile()">下载Linux(CentOS)客户端</el-button> -->
              <el-button type="warning" @click="DownloadFile('ubt')">下载Linux(Ubuntu)客户端</el-button>
            </div>
          </div>
        </el-col>

      </div>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {

    }
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() {},
  methods: {
    async DownloadFile(system){
      let softwareName =  'SecClientDC.exe'
      if(system === 'Windows'){
        softwareName = 'SecClientDC.exe'
      }else if(system === 'Mac'){
        softwareName = 'SecClientDC.pkg'
      }else if(system === 'ubt'){
        softwareName = 'SecClientDC.deb'
      }
      const a = document.createElement('a');
      a.style.display = 'none';
      // a.target = '_blank';
      a.href = softwareName;
      a.click();
      a.remove();
    },
  },
}
</script>
<style lang="scss" scoped>
/* @import url(); 引入css类 */
.wrap{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.content{
  margin-top: 30px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-end;
  .el-button{
    padding: 10px 20px;
  }
  div{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content:center;
    .el-button{
      margin-bottom: 10px;
      margin-left: 0px;
    }
  }
  svg{
    font-size: 40px;
  }
  p{
    width: 100%;
    height: 130px;
    line-height: 30px;
    padding: 0 20px;
    font-size: 14px;
  }
}

</style>
